package study;


import java.util.ArrayList;
import java.util.Scanner;

public class Teacher {
 private int id;
 private String teacherName;
 private Course[] courses;
 //构造函数
 public Teacher() {
  super();
  courses= new Course[3];
 }

 //修改或是添加属性
 public int getId() {
  return id;
 }
 public void setId(int id) {
  this.id = id;
 }
 public String getTeacherName() {
  return teacherName;
 }
 public void setTeacherName(String teacherName) {
  this.teacherName = teacherName;
 }
 public static void addteacher(ArrayList<Student> array){
     Student s = new Student();
     Scanner sc = new Scanner(System.in);
     System.out.println("请输入开设课程名称");
     String name = sc.nextLine();
     System.out.println("请输入开设课程编号");
     String num = sc.nextLine();
     System.out.println("请输入开设上课时间");
     String age = sc.nextLine();
     System.out.println("请输入开设上课地点");
     String address = sc.nextLine();
     s.setName(name);s.setNum(num);s.setAge(age);s.setAddress(address);
     array.add(s);
     System.out.println("添加选课成功");
 }
 
}


